<template>
  <!-- <WorkflowLayout /> -->
  <div>
    <span style="font-size: 16px" @click="doShowWin()">点击弹窗</span>
  </div>
</template>

<script>
  import { defineComponent } from 'vue';
  import { showSaasRbacWin } from '@/hooks/util';
  import { useMicroStore } from '@common/store/micro-store';
  export default defineComponent({
    name: 'SaasRbac',
    components: {},
    setup() {
      const doShowWin = () => {
        showSaasRbacWin(
          { productData: { productId: '34f7ef4f6dea4e349053d99f77db15fc' } },
          () => {},
        );
      };
      // 获取子应用store
      const microStore = useMicroStore();

      // 注册事件
      microStore.on('saasRbac-init', ({ productData }, fn) => {
        // ...业务逻辑
        showSaasRbacWin({ productData }, fn);
      });

      return { doShowWin };
    },
  });
</script>
